//Main组件的二级路由
const MainRouets = [
  {
    path:'/home',
    alias: '/',
    name:'Home',
    component: ()=> import('../views/Home')
  },
  {
    path:'/menu',
    name:'Menu',
    component: ()=> import('../views/Menu')
  },
  {
    path:'/shopping',
    name:'Shopping',
    component: ()=> import('../views/Shopping')
  },
  {
    path:'/my',
    name:'My',
    component: ()=> import('../views/My')
  }
]

export const routes = [
    {
      path: '/',
      name: 'Main',
      component: () => import('../views/Main'),
      //二级路由
      children: MainRouets
    },
    {
      path: '/login',
      name: 'Login',
      component: () => import('../views/Login')
    },
    {
      path:'/detail/:pid',
      name:'Detail',
      component:() => import('../views/Detail')
    },
    {
      path:'/addressList',
      name:'AddressList',
      component:() => import('../views/AddressList')
    },
    {
      path:'/addressEdit/:aid?',
      name:'AddressEdit',
      component:() => import('../views/AddressEdit')
    },
    {
      path:'/pay',
      name:'Pay',
      component:() => import('../views/Pay')
    },
    {
      path:'/collection',
      name:'Collection',
      component:() => import('../views/Collection')
    },
    {
      path:'/search',
      name:'Search',
      component:() => import('../views/Search')
    },
    {
      path:'/order',
      name:'Order',
      component:() => import('../views/Order')
    },
    {
      path:'/personalData',
      name:'PersonalData',
      component:() => import('../views/PersonalData')
    }
  ]